import { IFeidaoAiBrowserComponent, IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

export default function tpl(fd: IFeidaoAiBrowserComponent | IFeidaoAiNodejsComponent | any) {
	return `
	<div style="padding-left:10px;">
		<span style="margin:  20px;font-size: 20px;">新增数据常见错误</span>
		<span style="color: red;">新增数据只能使用原子操作insert，不能使用SQL</span>
		<div>
			<span>表结构（关系型数据库）</span>
			<img inline src="./images/add/1.png" width=300 data-feidao-actions="click:eu-001">
		</div>
		<div>
			<table style="margin-top:  10px;width:  100%;">
			<thead style="background: #f4f4f4;height: 40px;margin-top: 10px;line-height:  40px;border: 1px solid #ddd;">
				<tr>
					<td style="width:  50px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">序号</td>
					<td style="width:  100px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误说明</td>
					<td style="width:  300px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误截图</td>
				</tr>
			</thead>
			<tbody>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">1</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">新增的数据中存在表中不存在的字段，例如id<button data-feidao-actions="click:eu-003">执行服务</button></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/4.png' width=300 data-feidao-actions="click:eu-001"><br><img inline src='./images/add/4.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">2</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">新增的数据中主键字段的值已存在</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/add/2.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">3</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">新增的数据中字段数据类型不匹配</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/add/3.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">4</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">新增的数据中字段数据长度超出<button data-feidao-actions="click:eu-004">执行服务</button></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/add/4.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">6</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">新增多条数据(包含编码服务)</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img src='' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">7</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">表名不正确</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/5.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
			</tbody>
		</table>
		</div>
		<fd-wh000013 id='widget' header-bgc='coral' title='截图' style="width: 100%;height: 100%;display: block;top: 0px;" data-feidao-actions="fdwe-cancel:eu-002">
			<div slot='content'>
				<img src='' data-feidao-id='show-img' style="max-width: 100%;max-height: 100%;">
			</div>
			<div slot='footer'>
			</div>
		</fd-wh000013>
	</div>
	`;
}